package dreamCookGame;

import java.awt.Point;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;

public class Menu {

	Button[] _buttons;
	String _imgName;
	BufferedImage _img;
	Rectangle _boundingBox;
	
	public Menu(Button[] buttons, String imgName, Rectangle boundingBox) {
		_buttons = buttons;
		_imgName = imgName;
		_boundingBox = boundingBox;
	}
	
	public void loadResources(References reference) {
		_img = reference.getImage(_imgName);
		
		for(int i = 0; i < _buttons.length; i++) {
			_buttons[i].loadResources(reference);
		}
	}

	public boolean isWithinMenu(Point point) {
		return _boundingBox.contains(point);
	}

}
